package com.xbongbong.workflow.domain.dao;

import com.xbongbong.workflow.domain.entity.WorkflowBackupRichTextEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface WorkflowBackupRichTextDao {
    Long insert(WorkflowBackupRichTextEntity entity);

    void insertBatch(List<WorkflowBackupRichTextEntity> list);

    WorkflowBackupRichTextEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid);

    Integer update(WorkflowBackupRichTextEntity entity);

    List<WorkflowBackupRichTextEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer countNoEmptyList(@Param("param") Map<String, Object> params);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    void updateByBackupId(WorkflowBackupRichTextEntity entity);

    WorkflowBackupRichTextEntity getByBackupId(@Param("backupId") Long backupId, @Param("corpid") String corpid);

    void deleteComplete(@Param("params") Map<String, Object> params);
}